
zad1;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zad11
{
    class Program
    {
        static void Main(string[] args)
        {
            int br=0;
            int n = Convert.ToInt32(Console.ReadLine());
            for (int i = 0; i < n; i++)
            {
                string a = Console.ReadLine();
                StringBuilder sb=new StringBuilder();
                sb.Append(a);
                if(sb[0]=='a' || sb.Length<5)
                    br=br+1;
            
            }
            Console.WriteLine(br);
            Console.ReadKey();

        }
    }
}




zad 0;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zad1
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Convert.ToInt32(Console.ReadLine());
            List<int> a=new List<int>();
            for(int i=0;i<n;i++)
                a.Add(Convert.ToInt32(Console.ReadLine()));

            a.Sort();
            int k = n / 2;
            foreach (int x in a)
                Console.WriteLine(x);
                Console.WriteLine(a[n/2]);
            Console.ReadKey();
        }
    }
}

sito 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication4
{
    class Program
    {
        static void Main(string[] args)
        {
            int n, v, br, i;
        
            n = Convert.ToInt32(Console.ReadLine());
            int[] a = new int[1000];
            for (br = 2; br<= n; br++)
            {
                v = br;
                if (a[v] == 0)
                {
                    Console.WriteLine(br);

                    for (i = 2; v <= n; i++)
                    {
                        v = br * i;
                       a[v] = 1;
                    }
                }
            }

            Console.ReadKey();
        }
    }
}


zad4

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zad11
{
    class Program
    {
        static void Main(string[] args)
        {
            int br=0;
            int br1 = 0;
            int n = Convert.ToInt32(Console.ReadLine());
            for (int i = 0; i < n; i++)
            {
                string a = Console.ReadLine();
                StringBuilder sb=new StringBuilder();
                sb.Append(a);
                for (int j = 0; j < sb.Length; j++)
                {
                    if (sb[j] == '5')
                        br = br + 1;                
                }
                try
                    {
                     int m = Int32.Parse(a);
                     if (m % 4 == 0)
                         br1 = br1 + 1;
                    }
                catch (FormatException e)
                {
                    Console.WriteLine(e.Message);
                }
               
            } 
            Console.WriteLine(br);
            Console.WriteLine(br1);
            Console.ReadKey();

        }
    }
}

zad3;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zad11
{
    class Program
    {
        static void Main(string[] args)
        {
            int k = 0;
            int br=0;
            int br1=0;
            int n = Convert.ToInt32(Console.ReadLine());
            int[,] a=new int [n,10000];
            int[] b=new int[n];
            int[] c= new int[n];


            Console.WriteLine("unesi broj ocena po djaku");
            for (int i = 0; i < n; i++)
                c[i] = 0;

 for(int i=0;i<n;i++)
 {
    
     b[i]=Convert.ToInt32(Console.ReadLine());
 }

 int maxi = b[0];
 for (int i = 0; i < n; i++)
 {
     if (b[i] > maxi)
         maxi = b[i];
 }

            for(int i=0;i<n;i++)
                for (int j = 0; j < b[i]; j++)
                {
                    a[i, j] = Convert.ToInt32(Console.ReadLine());
                }

            for (int i = 0; i < n; i++)        
                for (int j = 0; j < b[i]; j++)
                {
                    Console.WriteLine(a[i, j]);
             
               }
            for (int i = 0; i < n; i++)
            {
                if (b[i] < maxi)
                    br = br + 1;
                  }
              Console.WriteLine("broj djaka koji nisu ocenjeni {0}",br);
            
             for(int i=0;i<n;i++)
                 for (int j = 0; j < b[i]; j++)
                 {
                     if (a[i, j] == 3)
                         br1 = br1 + 1;
                     c[i] = br1;
                  }
             int maxi1 = 0;
             for (int i = 0; i < n; i++)
             {
                 if (c[i] > maxi1)
                 {
                     maxi = i;
                     
                 }
             }
             Console.WriteLine(k);
             Console.ReadKey();
            
        }
    }
}



